﻿USE [ALIBABA]
GO
/****** Object:  Table [dbo].[DONVITINH]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DONVITINH](
	[MaDVT] [int] IDENTITY(1,1) NOT NULL,
	[TenDVT] [nvarchar](15) NULL,
 CONSTRAINT [PK_DONVITINH] PRIMARY KEY CLUSTERED 
(
	[MaDVT] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[DONVITINH] ON
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (1, N'Acre')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (2, N'Ampere')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (3, N'Bag')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (4, N'Barrel')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (5, N'Box')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (6, N'Bushel')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (7, N'Carat')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (8, N'Centimeter')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (9, N'Chain')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (10, N'Carton')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (12, N'Cubic foot')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (13, N'Cubic Inch')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (14, N'Cubic Meter')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (15, N'Cubit Yard')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (16, N'Degrees Celsius')
INSERT [dbo].[DONVITINH] ([MaDVT], [TenDVT]) VALUES (17, N'Dozen')
SET IDENTITY_INSERT [dbo].[DONVITINH] OFF
/****** Object:  Table [dbo].[QUOCGIA]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[QUOCGIA](
	[MaQuocGia] [int] IDENTITY(1,1) NOT NULL,
	[TenQuocGia] [varchar](20) NOT NULL,
 CONSTRAINT [PK_QUOCGIA] PRIMARY KEY CLUSTERED 
(
	[MaQuocGia] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[QUOCGIA] ON
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (1, N'VietNam')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (2, N'India')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (3, N'India')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (4, N'united Statea')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (5, N'China')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (6, N'United Kingdom')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (7, N'Australia')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (8, N'Brazil')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (9, N'Canada')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (10, N'Egypt')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (11, N'HongKong')
INSERT [dbo].[QUOCGIA] ([MaQuocGia], [TenQuocGia]) VALUES (12, N'Iran')
SET IDENTITY_INSERT [dbo].[QUOCGIA] OFF
/****** Object:  Table [dbo].[LOAITHANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LOAITHANHVIEN](
	[MaLoaiTV] [int] NOT NULL,
	[TenLoaiTV] [nvarchar](20) NOT NULL,
 CONSTRAINT [PK_LOAITHANHVIEN] PRIMARY KEY CLUSTERED 
(
	[MaLoaiTV] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[LOAITHANHTOAN]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LOAITHANHTOAN](
	[MaLoaiThanhToan] [int] IDENTITY(1,1) NOT NULL,
	[TenLoaiThanhToan] [varchar](20) NOT NULL,
	[GhiChi] [ntext] NULL,
 CONSTRAINT [PK_LOAITHANHTOAN] PRIMARY KEY CLUSTERED 
(
	[MaLoaiThanhToan] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[LOAITHANHTOAN] ON
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (1, N'L/C', NULL)
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (2, N'D/A', NULL)
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (3, N'D/P', NULL)
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (4, N'T/T', NULL)
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (6, N'MoneyGram', NULL)
INSERT [dbo].[LOAITHANHTOAN] ([MaLoaiThanhToan], [TenLoaiThanhToan], [GhiChi]) VALUES (7, N'Western Union', NULL)
SET IDENTITY_INSERT [dbo].[LOAITHANHTOAN] OFF
/****** Object:  Table [dbo].[LINHVUC]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LINHVUC](
	[MaLinhVuc] [int] IDENTITY(1,1) NOT NULL,
	[TenLinhVuc] [nvarchar](30) NOT NULL,
 CONSTRAINT [PK_LINHVUC] PRIMARY KEY CLUSTERED 
(
	[MaLinhVuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[LINHVUC] ON
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (1, N'Consumer Electronics')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (2, N'Computer')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (3, N'Chemicals')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (4, N'Furniture')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (5, N'Gifts & Crafts')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (6, N'Health & Medical')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (7, N'Home Appliances')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (8, N'Home & Garden')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (9, N'Light & Lighting')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (10, N'Machinery')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (11, N'Shoes & Accessories')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (12, N'Agriculture')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (13, N'Apparel')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (14, N'Automobiles & Motorcycles')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (15, N'Energy')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (16, N'Fashtion Accessories')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (17, N'Food & Beverage')
INSERT [dbo].[LINHVUC] ([MaLinhVuc], [TenLinhVuc]) VALUES (18, N'Office & School Supplies')
SET IDENTITY_INSERT [dbo].[LINHVUC] OFF
/****** Object:  Table [dbo].[DANHMUC]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DANHMUC](
	[MaDanhMuc] [int] IDENTITY(1,1) NOT NULL,
	[TenDanhMuc] [nvarchar](50) NOT NULL,
	[MaLinhVuc] [int] NULL,
 CONSTRAINT [PK_DANHMUC] PRIMARY KEY CLUSTERED 
(
	[MaDanhMuc] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET IDENTITY_INSERT [dbo].[DANHMUC] ON
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (1, N'MP4 Player', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (2, N'Digital Camera', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (3, N'Television', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (4, N'Movie', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (5, N'Digital Photo Frame', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (6, N'Video Game Console', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (7, N'DVD, VCD Player', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (8, N'Game Player Accessories', 1)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (9, N'Laptops', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (10, N'USB Flashs Driver', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (11, N'Webcams', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (12, N'Software', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (13, N'CPUs', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (14, N'Keyboards', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (15, N'LCD Monitor', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (16, N'Desktops', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (17, N'Routers', 2)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (18, N'Alkali', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (19, N'Organic Intermediate', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (20, N'Preservatives', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (21, N'Sweeteners', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (22, N'Building Coating', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (23, N'Furniture Paint', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (26, N'General Reagents', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (27, N'Activated Carbon', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (28, N'Antibiotic and Antimucrobial Agents', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (29, N'Vitamis, Amino Acids and Coenzymes', 3)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (30, N'Antique Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (31, N'Bar Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (32, N'Children Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (33, N'Home Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (34, N'Hotel Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (35, N'Office Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (36, N'Outdoor Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (37, N'Rattan/ Wicker Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (38, N'Wood Furniture', 4)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (39, N'Stickers', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (40, N'Lanyard', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (41, N'Crystal Crafts', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (42, N'Glass Crafts', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (43, N'Festive & Party Supplies', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (44, N'Holiday Gifts', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (45, N'Home Decoration', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (46, N'Painting & Calligraphy', 5)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (47, N'Sex Product', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (48, N'Dental Supplies', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (49, N'Medicine', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (50, N'Massager', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (51, N'Pharmaceutical', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (52, N'Examination & Testing Instrument', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (53, N'I . V Suplies', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (54, N'Herb Medicine', 6)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (55, N'Popular Home Appliances', 7)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (56, N'Air Conditioners', 7)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (57, N'Coffee Markers', 7)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (58, N'Pet Product', 8)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (59, N'Tableware', 8)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (60, N'Cooking Tools', 8)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (61, N'Cookware', 8)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (62, N'Garden Supplies', 8)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (63, N'Celling Lights', 9)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (64, N'Pool Lights', 9)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (65, N'Construction Machinery', 10)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (66, N'Mining Machinery', 10)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (67, N'Sport Shoes', 11)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (68, N'Women Dress Shoes', 11)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (69, N'Men Dress Shoes', 11)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (70, N'Boots', 11)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (71, N'Rice', 12)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (72, N'Apples', 12)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (73, N'Olive Oil', 12)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (74, N'Men Clothing', 13)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (75, N'Women Clothing', 13)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (76, N'T-Shirts', 13)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (77, N'ATV', 14)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (78, N'Tires', 14)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (79, N'Used Cars', 14)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (80, N'Crude Oil', 15)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (81, N'Lubricant', 15)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (82, N'Coal', 15)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (83, N'Paraffin', 15)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (84, N'Ear Muffs', 16)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (85, N'Children Hat & Caps', 16)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (86, N'Health Food', 17)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (87, N'Seafood', 17)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (88, N'Sugar', 17)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (89, N'Pens', 18)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (90, N'Caculator', 18)
INSERT [dbo].[DANHMUC] ([MaDanhMuc], [TenDanhMuc], [MaLinhVuc]) VALUES (91, N'Copier', 18)
SET IDENTITY_INSERT [dbo].[DANHMUC] OFF
/****** Object:  Table [dbo].[TINHTHANH/BANG]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TINHTHANH/BANG](
	[MaTinhThanh/Bang] [int] IDENTITY(1,1) NOT NULL,
	[TenTinhThanh/Bang] [varchar](30) NOT NULL,
	[MaQuocGia] [int] NULL,
 CONSTRAINT [PK_TINHTHANH/BANG] PRIMARY KEY CLUSTERED 
(
	[MaTinhThanh/Bang] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[TINHTHANH/BANG] ON
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (1, N'HoChiMinh', 1)
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (2, N'HaNoi', 1)
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (3, N'BinhDuong', 1)
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (4, N'NamDinh', 1)
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (5, N'Hue', 1)
INSERT [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang], [TenTinhThanh/Bang], [MaQuocGia]) VALUES (6, N'DaNang', 1)
SET IDENTITY_INSERT [dbo].[TINHTHANH/BANG] OFF
/****** Object:  StoredProcedure [dbo].[SP_DANHSACHLINHVUC]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_DANHSACHLINHVUC]
AS
BEGIN
	SELECT * FROM LINHVUC
END
GO
/****** Object:  Table [dbo].[THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[THANHVIEN](
	[MaTV] [int] IDENTITY(1,1) NOT NULL,
	[Email] [varchar](50) NOT NULL,
	[Password] [varchar](50) NOT NULL,
	[MaQuocGia] [int] NULL,
	[MaTinhThanh/Bang] [int] NULL,
	[HoTen] [nvarchar](50) NOT NULL,
	[TenCongTy] [nvarchar](50) NULL,
	[SoDT] [varchar](13) NULL,
	[DiaChiCongTy] [nvarchar](50) NULL,
	[NamThanhLap] [int] NULL,
	[website] [varchar](50) NULL,
	[QuiMo] [varchar](30) NULL,
	[DiaChiNhaMay] [nvarchar](50) NULL,
	[QuiMoNhaMay] [varchar](30) NULL,
	[HinhAnh] [varchar](50) NULL,
	[GioiThieuVeCongTy] [ntext] NULL,
	[MaLoaiTV] [int] NULL,
	[TinhTrangThanhVien] [int] NULL,
	[LaThanhVien] [bit] NULL,
	[NgayBatDau] [date] NULL,
	[NgayKeThuc] [date] NULL,
 CONSTRAINT [PK_THANHVIEN] PRIMARY KEY CLUSTERED 
(
	[MaTV] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [uc_Email] UNIQUE NONCLUSTERED 
(
	[Email] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[THANHVIEN] ON
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (1, N'vutrongvu@yahoo.com.vn', N'123456', 1, 1, N'vutrongvu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (6, N'vutrongvu@yahoo.com', N'123456', 1, 1, N'Nguyen van Bang', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (7, N'nguyenthanhthai@gmail.com.vn', N'123456', 1, 1, N'Tran Anh Thu', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (8, N'vothisau@yahoo.com', N'123456', 1, 1, N'Vo Thi Sau', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (9, N'lebaan2yahoo.com', N'123456', 1, 1, N'Le Ba An', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
INSERT [dbo].[THANHVIEN] ([MaTV], [Email], [Password], [MaQuocGia], [MaTinhThanh/Bang], [HoTen], [TenCongTy], [SoDT], [DiaChiCongTy], [NamThanhLap], [website], [QuiMo], [DiaChiNhaMay], [QuiMoNhaMay], [HinhAnh], [GioiThieuVeCongTy], [MaLoaiTV], [TinhTrangThanhVien], [LaThanhVien], [NgayBatDau], [NgayKeThuc]) VALUES (11, N'trinhanh@gmail.com', N'123456', 1, 1, N'Trinh Anh', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[THANHVIEN] OFF
/****** Object:  StoredProcedure [dbo].[SP_DANHSACHDANHMUC]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_DANHSACHDANHMUC]
(
	@maLinVuc varchar(10)
)
AS
BEGIN
	SELECT * FROM DANHMUC where MaLinhVuc = @maLinVuc
END
GO
/****** Object:  Table [dbo].[THONGSOSANPHAM]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[THONGSOSANPHAM](
	[MaThongSo] [int] NOT NULL,
	[MaDM] [int] NULL,
	[ThongSo] [varchar](50) NULL,
	[TenThongSo] [varchar](50) NULL,
 CONSTRAINT [PK_ThongSo] PRIMARY KEY CLUSTERED 
(
	[MaThongSo] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[THONGSOMACDINH]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[THONGSOMACDINH](
	[MaThongSoMD] [int] NOT NULL,
	[MaThongSo] [int] NULL,
	[ThongSoMacDinh] [varchar](50) NULL,
 CONSTRAINT [PK_THONGSOMACDINH] PRIMARY KEY CLUSTERED 
(
	[MaThongSoMD] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SANPHAMMUA]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SANPHAMMUA](
	[MaSPMua] [int] IDENTITY(1,1) NOT NULL,
	[TenSP] [nvarchar](50) NULL,
	[MaDanhMuc] [int] NULL,
	[SoLuongCanMua] [int] NULL,
	[HinhAnh] [varchar](50) NULL,
	[MaThanhVien] [int] NULL,
	[ChiTiet] [ntext] NULL,
	[TinhTrang] [bit] NULL,
	[NgayDang] [date] NULL,
 CONSTRAINT [PK_SANPHAMMUA] PRIMARY KEY CLUSTERED 
(
	[MaSPMua] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SANPHAM]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SANPHAM](
	[MaSP] [int] IDENTITY(1,1) NOT NULL,
	[TenSP] [nvarchar](80) NULL,
	[HinhAnh] [varchar](100) NULL,
	[Gia] [decimal](9, 0) NULL,
	[SoLuongDatToiThieu] [int] NULL,
	[KhaNangCungUng] [int] NOT NULL,
	[MaLoaiThanhToan] [varchar](15) NULL,
	[MaDanhMuc] [int] NULL,
	[MaQuocGia] [int] NULL,
	[MaThanhVien] [int] NULL,
	[MaDVT] [int] NULL,
	[TinhTrang] [bit] NULL,
	[ChiTiet] [ntext] NULL,
 CONSTRAINT [PK_SANPHAM] PRIMARY KEY CLUSTERED 
(
	[MaSP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[SANPHAM] ON
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (1, N'digital mp5 player with game fm fuction', N'MP4_Player_10.jpg', CAST(1000000 AS Decimal(9, 0)), 100, 1000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (2, N'2.4'' lcd digital Photo Frame greeting cards', N'MP4_Player_11.jpg', CAST(2000000 AS Decimal(9, 0)), 100, 1000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (3, N'MP4 video module', N'MP4_Player_12.jpg', CAST(500000 AS Decimal(9, 0)), 500, 2000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (7, N'cheap 1.8 inch 6th gen clip ', N'MP4_Player_1.jpg', CAST(200000 AS Decimal(9, 0)), 500, 1000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (8, N'1.8inch screen 4rd mp4 player 8GB. special offer', N'MP4_Player_2.jpg', CAST(100000 AS Decimal(9, 0)), 50, 2000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (9, N'ctory Promotional OEM MP4 Player with Low Price', N'MP4_Player_3.jpg', CAST(1000000 AS Decimal(9, 0)), 100, 10000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (10, N'New 8GB 4th Gen MP4 Player 1.8'' Video Radio FM MP3 MP4', N'MP4_Player_4.jpg', CAST(500000 AS Decimal(9, 0)), 300, 200000, N'1', 1, 1, 1, 1, 1, N'a')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (11, N'6th Generation Clip MP3 MP4 Player Digital MP4 Player, 1.8" touch Screen', N'MP4_Player_5.jpg', CAST(350000 AS Decimal(9, 0)), 500, 200000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (12, N'Hot Sell MP4 Player', N'MP4_Player_6.jpg', CAST(160000 AS Decimal(9, 0)), 1000, 300000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (13, N'digital 5th 2.0'' mp4 player', N'MP4_Player_7.jpg', CAST(60000 AS Decimal(9, 0)), 100, 2000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (14, N'1.8 inch 7th Generation Digital Video mp4 player SN1822', N'MP4_Player_8.jpg', CAST(350000 AS Decimal(9, 0)), 500, 200000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (15, N'2.8" Touch Screen Mp4 Player', N'MP4_Player_9.jpg', CAST(250000 AS Decimal(9, 0)), 200, 100000, N'1', 1, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (16, N'Travor battery grip for NIKON D3100 D3200 DSLR Camera', N'Digital_camera_1.jpg', CAST(150000 AS Decimal(9, 0)), 100, 5000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (17, N'Ltl Acorn gsm trail camera for farm security', N'Digital_camera_2.jpg', CAST(3000000 AS Decimal(9, 0)), 1500, 1000000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (18, N'Vista Quest VQ1015R2 VQ1015 R2 Mini Digital Camera', N'Digital_camera_3.jpg', CAST(20 AS Decimal(9, 0)), 1000, 2000000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (19, N'Popular Digital Camera with 12.0Megapixel', N'Digital_camera_4.jpg', CAST(50000 AS Decimal(9, 0)), 1, 1000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (20, N'Japan Digital Camera Nikon D800', N'Digital_camera_5.jpg', CAST(100000 AS Decimal(9, 0)), 1, 1000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (21, N'reusable underwater lomo camera with a strap', N'Digital_camera_6.jpg', CAST(1000000 AS Decimal(9, 0)), 100, 2000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (22, N'Canon PowerShot SX50 HS Digital Compact Camera', N'Digital_camera_7.jpg', CAST(150000 AS Decimal(9, 0)), 150, 2000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (23, N'Sony A57 Body Digital Camera Brand New Drop Ship', N'Digital_camera_8.jpg', CAST(250000 AS Decimal(9, 0)), 200, 4000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (24, N'Nikon D5100 Digital Camera Kit with 18-55mm', N'Digital_camera_9.jpg', CAST(2500000 AS Decimal(9, 0)), 20, 2000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (25, N'Nikon D600 Digital SLR cameras', N'Digital_camera_10.jpg', CAST(3400000 AS Decimal(9, 0)), 5, 200, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (26, N'hot selling 5x optical zoom CCD 15MP gift digital camera DC-K718C', N'Digital_camera_11.jpg', CAST(2000000 AS Decimal(9, 0)), 1, 1000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (27, N'Nikon Digital Camera D7000 DSLR Brand New', N'Digital_camera_12.jpg', CAST(2000000 AS Decimal(9, 0)), 20, 5000, N'1', 2, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (28, N'Multifuntional 17 inch LCD TV monitor with inhaled DVD Player', N'TiVi_1.jpg', CAST(6000000 AS Decimal(9, 0)), 300, 300000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (29, N'Good price!! 32 inch hotel HD LED TV+high quality', N'TiVi_2.jpg', CAST(500000 AS Decimal(9, 0)), 450, 500000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (30, N'Fantastic Visual Enjoy 47 Inch 3D Smart TV With Glasses', N'TiVi_3.jpg', CAST(15000000 AS Decimal(9, 0)), 150, 50000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (31, N'Ultra Narrow Bezel LED TV', N'TiVi_4.jpg', CAST(10000000 AS Decimal(9, 0)), 250, 400000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (32, N'55 inch color led tv', N'TiVi_5.jpg', CAST(4500000 AS Decimal(9, 0)), 150, 250000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (33, N'B5 LCD TV', N'TiVi_6.jpg', CAST(7500000 AS Decimal(9, 0)), 250, 15000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (34, N'Fashion thin 3d LED TV', N'TiVi_7.jpg', CAST(4500000 AS Decimal(9, 0)), 25, 50000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (35, N'LCD TV', N'TiVi_8.jpg', CAST(5000000 AS Decimal(9, 0)), 200, 3000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (36, N'42 inche FHD LED TV with USB', N'TiVi_9.jpg', CAST(10000000 AS Decimal(9, 0)), 100, 4000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (37, N'42" Fashionable Superslim Samsung Style 3D LED TV', N'TiVi_10.jpg', CAST(25000000 AS Decimal(9, 0)), 100, 5000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (38, N'cheapest price 14inch LCD TV with USB', N'TiVi_11.jpg', CAST(4500000 AS Decimal(9, 0)), 100, 5000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (39, N'25" LED TV', N'TiVi_12.jpg', CAST(85000000 AS Decimal(9, 0)), 250, 6000, N'1', 3, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (40, N'funny acrylic photo frame', N'Digital_photo_frame_1.jpg', CAST(15000 AS Decimal(9, 0)), 2000, 600000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (41, N'Acrylic photo frame in different colors', N'Digital_photo_frame_2.jpg', CAST(10000 AS Decimal(9, 0)), 1000, 400000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (42, N'2013 acrylic photo frame acrylic picture frame clear magnet photo frames', N'Digital_photo_frame_3.jpg', CAST(45000 AS Decimal(9, 0)), 500, 200000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (43, N'digital photo frame', N'Digital_photo_frame_4.jpg', CAST(30000 AS Decimal(9, 0)), 3000, 500000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (44, N'Lovely Heart metal photo frame', N'Digital_photo_frame_5.jpg', CAST(25000 AS Decimal(9, 0)), 2000, 300000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (45, N'7 inch Digital Photo Frame Shenzhen Factory', N'Digital_photo_frame_6.jpg', CAST(15000 AS Decimal(9, 0)), 2000, 100000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (46, N'model K-1910DPF, 10 inch LCD digital photo frame', N'Digital_photo_frame_7.jpg', CAST(35000 AS Decimal(9, 0)), 1000, 100000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (47, N'AC-308D 7 inch Multi-function Digital photo frame', N'Digital_photo_frame_8.jpg', CAST(30000 AS Decimal(9, 0)), 1000, 100000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (48, N'7 inch digital photo frame with human motion sensor (Top factory 6 years)', N'Digital_photo_frame_9.jpg', CAST(50000 AS Decimal(9, 0)), 500, 100000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (49, N'3D 7inch Digital Picture Frame with small size', N'Digital_photo_frame_10.jpg', CAST(100000 AS Decimal(9, 0)), 500, 60000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (50, N'8 Inch LCD Digital Photo Frame', N'Digital_photo_frame_11.jpg', CAST(10000 AS Decimal(9, 0)), 50, 20000, N'1', 5, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (51, N'Jazz Drum (Deluxe) music game machine', N'Video_game_console_1.jpg', CAST(2500000 AS Decimal(9, 0)), 10, 50000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (52, N'32 Bit Wireless Video Game Controller', N'Video_game_console_2.jpg', CAST(500000 AS Decimal(9, 0)), 2000, 100000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (53, N'hot sale fishing season game machine', N'Video_game_console_3.jpg', CAST(350000 AS Decimal(9, 0)), 1, 5000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (54, N'coin operated Mini Arcade Game Machine BS-T1GB10C', N'Video_game_console_4.jpg', CAST(5000000 AS Decimal(9, 0)), 100, 5000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (55, N'game accessory for xbox-360 game console', N'Video_game_console_5.jpg', CAST(25000 AS Decimal(9, 0)), 100, 3000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (56, N'PC305,new style video gamepad,mutifunction game controller', N'Video_game_console_6.jpg', CAST(25000 AS Decimal(9, 0)), 100, 5000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (57, N'Hot TV game console', N'Video_game_console_7.jpg', CAST(300000 AS Decimal(9, 0)), 30, 5000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (58, N'B-002-2 RAMBO - 55''LCD Rambo Shooting Machine', N'Video_game_console_8.jpg', CAST(50000000 AS Decimal(9, 0)), 1, 1000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (59, N'two seats 42 inch LCD MANX TT motor running arcade game station', N'Video_game_console_9.jpg', CAST(65000000 AS Decimal(9, 0)), 1, 1000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (60, N'Retro Duo NES/SNES 8-bit and 16-Bit Video Game Console', N'Video_game_console_10.jpg', CAST(1500000 AS Decimal(9, 0)), 20, 20000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (61, N'Wireless Sport Video Game', N'Video_game_console_11.jpg', CAST(40000 AS Decimal(9, 0)), 50, 6000, N'1', 6, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (62, N'high gloss decorative metal sheet for DVD player', N'DVD_VCD_Player_1.jpg', CAST(50000 AS Decimal(9, 0)), 20, 11000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (63, N'A-DVD-670 hdmi dvd player with speaker', N'DVD_VCD_Player_2.jpg', CAST(350000 AS Decimal(9, 0)), 50, 4000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (64, N'9.5" Portable evd dvd player (DS9001)', N'DVD_VCD_Player_3.jpg', CAST(450000 AS Decimal(9, 0)), 30, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (65, N'HD Big Screen Portable DVD Player', N'DVD_VCD_Player_4.jpg', CAST(150000 AS Decimal(9, 0)), 50, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (66, N'medium size DIVX home DVD player with USB port', N'DVD_VCD_Player_5.jpg', CAST(30000 AS Decimal(9, 0)), 40, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (67, N'7 inch EVD Portable dvd player with all function', N'DVD_VCD_Player_6.jpg', CAST(50000 AS Decimal(9, 0)), 25, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (68, N'10.1inch portable DVD player full function with TVtuner', N'DVD_VCD_Player_7.jpg', CAST(150000 AS Decimal(9, 0)), 1, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (69, N'9 inch Portable DVD Player with tv tuner', N'DVD_VCD_Player_8.jpg', CAST(350000 AS Decimal(9, 0)), 500, 4000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (70, N'9 DVD player with high quality and cheapest price', N'DVD_VCD_Player_9.jpg', CAST(75000 AS Decimal(9, 0)), 20, 1500, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (71, N'Mini 5.1CH DVD player', N'DVD_VCD_Player_10.jpg', CAST(25000 AS Decimal(9, 0)), 15, 1200, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (72, N'Portable dvd player with tv', N'DVD_VCD_Player_11.jpg', CAST(45000 AS Decimal(9, 0)), 30, 1000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (73, N'Portable DVD Player with TV Tuner', N'DVD_VCD_Player_12.jpg', CAST(5000000 AS Decimal(9, 0)), 10, 2000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (74, N'DVD-3613 DVD player', N'DVD_VCD_Player_12.jpg', CAST(1000000 AS Decimal(9, 0)), 1000, 50000, N'1', 7, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (75, N'RG59 tv cable', N'Game_Player_1.jpg', CAST(15000 AS Decimal(9, 0)), 30, 4000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (76, N'12v battery charger DC adapter', N'Game_Player_2.jpg', CAST(45000 AS Decimal(9, 0)), 300, 30000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (77, N'7.2V 700mAh AAA NIMH rechargeable battery pack', N'Game_Player_3.jpg', CAST(35000 AS Decimal(9, 0)), 100, 10000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (78, N'Hot sell! Cheap controller for SNES PC/USB', N'Game_Player_4.jpg', CAST(15000 AS Decimal(9, 0)), 200, 10000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (79, N'Repair part Laser KES-450A for PS3 Slim', N'Game_Player_5.jpg', CAST(50000 AS Decimal(9, 0)), 200, 1000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (80, N'Bluetooth Wireless Controller for PS3 Game Console', N'Game_Player_6.jpg', CAST(100000 AS Decimal(9, 0)), 150, 1000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (81, N'for wii motion plus compatible with remote well', N'Game_Player_7.jpg', CAST(25000 AS Decimal(9, 0)), 200, 3000, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (82, N'bluetooth wireless controller for ps3 joystick', N'Game_Player_8.jpg', CAST(25000 AS Decimal(9, 0)), 15, 500, N'1', 8, 1, 1, 1, 1, N'A')
INSERT [dbo].[SANPHAM] ([MaSP], [TenSP], [HinhAnh], [Gia], [SoLuongDatToiThieu], [KhaNangCungUng], [MaLoaiThanhToan], [MaDanhMuc], [MaQuocGia], [MaThanhVien], [MaDVT], [TinhTrang], [ChiTiet]) VALUES (87, N'kdsjfs', N'fshdj', CAST(12222 AS Decimal(9, 0)), 12, 12000, N'1', 1, 1, 1, 1, 1, N'A')
SET IDENTITY_INSERT [dbo].[SANPHAM] OFF
/****** Object:  Table [dbo].[QA]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[QA](
	[MaQA] [int] NOT NULL,
	[NguoiDang] [int] NULL,
	[NgayDang] [date] NULL,
	[ChuDe] [nvarchar](50) NULL,
	[NoiDung] [ntext] NULL,
 CONSTRAINT [PK_QA] PRIMARY KEY CLUSTERED 
(
	[MaQA] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[EMAILCONTACT]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EMAILCONTACT](
	[MaEmail] [int] IDENTITY(1,1) NOT NULL,
	[EmailNguoiGui] [varchar](50) NULL,
	[EmailNguoiNhan] [varchar](50) NULL,
	[MaSP] [int] NULL,
	[ChuDe] [nvarchar](50) NULL,
	[NoiDung] [ntext] NULL,
	[HinhAnhSanPham] [varchar](50) NULL,
	[Link] [varchar](50) NULL,
	[NgayGui] [date] NULL,
 CONSTRAINT [PK_EMAILCONTACT] PRIMARY KEY CLUSTERED 
(
	[MaEmail] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[EMAILCONTACT] ON
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (11, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', 1, N'1', N'sajhfsjk', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x3A370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (12, N'vutrongvu@yahoo.com.vn', N'trinhanh@gmail.com', 1, N'I want to buy your product', N'I can send product''s quote for me', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x1A370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (13, N'vutrongvu@yahoo.com.vn', N'lebaan2yahoo.com', 1, N'I have interested', N'I can buy for me', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x90350B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (17, N'trinhanh@gmail.com', N'vutrongvu@yahoo.com.vn', 1, N'I want to join your group', N'lkl asdhk ksdjfhk', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x3F370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (18, N'trinhanh@gmail.com', N'vutrongvu@yahoo.com.vn', 1, N'I want to join your group', N'sca sdf', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x3F370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (19, N'vutrongvu@yahoo.com.vn', N'lebaan2yahoo.com', 1, N'I want to quote ', N'wdw dgfse dsfsd', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x3F370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (20, N'vutrongvu@yahoo.com.vn', N'trinhanh@gmail.com', 1, N'I want to join your group', N'gfhgdy', N'MP4_Player_10.jpg', N'/Product/ProductDetail/1', CAST(0x40370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (21, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', 2, N'I would like to know more about your product', N'<p>as</p>
', N'MP4_Player_11.jpg', N'/Product/ProductDetail/2', CAST(0x44370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (23, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', 9, N'I would like to know more about your product', N'<p>qw</p>
', N'MP4_Player_3.jpg', N'/Product/ProductDetail/9', CAST(0x45370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (24, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', 9, N'I would like to know more about your product', N'<p>asd</p>
', N'MP4_Player_3.jpg', N'/Product/ProductDetail/9', CAST(0x45370B00 AS Date))
INSERT [dbo].[EMAILCONTACT] ([MaEmail], [EmailNguoiGui], [EmailNguoiNhan], [MaSP], [ChuDe], [NoiDung], [HinhAnhSanPham], [Link], [NgayGui]) VALUES (26, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', 9, N'I would like to know more about your product', N'Ban hay noi ro ban muon mua cai gi trong nay', N'MP4_Player_3.jpg', N'/Product/ProductDetail/9', CAST(0x45370B00 AS Date))
SET IDENTITY_INSERT [dbo].[EMAILCONTACT] OFF
/****** Object:  Table [dbo].[CHITIETSANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[CHITIETSANPHAM](
	[MaThongSoMD] [int] NOT NULL,
	[MaSP] [int] NOT NULL,
	[ChiTiet] [varchar](50) NULL,
 CONSTRAINT [PK_CHITIETSANPHAM_1] PRIMARY KEY CLUSTERED 
(
	[MaThongSoMD] ASC,
	[MaSP] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[BAOGIA]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BAOGIA](
	[MaBaoGia] [int] IDENTITY(1,1) NOT NULL,
	[File] [varchar](50) NULL,
	[MaSP] [int] NULL,
	[EmailNguoiGui] [varchar](50) NULL,
	[EmailNguoiNhan] [varchar](50) NULL,
	[Link] [varchar](30) NULL,
	[TinhTrang] [int] NULL,
	[NgayBaoGia] [date] NULL,
 CONSTRAINT [PK_BAOGIA] PRIMARY KEY CLUSTERED 
(
	[MaBaoGia] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[BAOGIA] ON
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (1, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (2, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (3, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (4, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (5, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (6, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (7, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (8, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (9, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (10, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (11, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (12, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (13, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (14, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (15, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (16, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (17, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (18, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (19, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (20, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (21, N'AAA.XSL', 1, N'vutrongvu@yahoo.com', N'vutrongvu@yahoo.com.vn', N'/Product/ProductDetail/1', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (22, N'AAA.XSL', 2, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (23, N'AAA.XSL', 3, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (27, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (28, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (29, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (30, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (31, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (32, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (33, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
INSERT [dbo].[BAOGIA] ([MaBaoGia], [File], [MaSP], [EmailNguoiGui], [EmailNguoiNhan], [Link], [TinhTrang], [NgayBaoGia]) VALUES (34, N'AAA.XSL', 8, N'vutrongvu@yahoo.com.vn', N'vutrongvu@yahoo.com', N'/Product/ProductDetail/2', 0, CAST(0x45370B00 AS Date))
SET IDENTITY_INSERT [dbo].[BAOGIA] OFF
/****** Object:  StoredProcedure [dbo].[SP_XOASANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[SP_XOASANPHAM]
(
	@MaSP int
)as
begin
	Delete SANPHAM where MaSP = @MaSP
end
GO
/****** Object:  StoredProcedure [dbo].[SP_XOAEMAILCONTACT]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[SP_XOAEMAILCONTACT]
(
	@maEmailContact int
)as
begin
	delete EMAILCONTACT where MaEmail = @maEmailContact
end
GO
/****** Object:  StoredProcedure [dbo].[SP_TongSanPhamTheoDanhMuc]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[SP_TongSanPhamTheoDanhMuc]
(
	@maDanhMuc INT
)as
begin
	select COUNT(*) as 'tong' from SANPHAM where MaDanhMuc = @maDanhMuc
end
GO
/****** Object:  StoredProcedure [dbo].[SP_THEMSANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[SP_THEMSANPHAM]
(
	@tenSP nvarchar(80),
	@hinhAnh varchar(100),
	@gia decimal(9, 0),
	@soLuongDatToiThieu int,
	@khaNangCungCap int,
	@maLoaiThanhToan varchar(15),
	@maDanhMuc int,
	@maQuocGia int,
	@maThanhVien int,
	@maDVT int,
	@chiTiet ntext
)as
begin
	insert into SANPHAM values (@tenSp, @hinhAnh, @gia, @soLuongDatToiThieu, 
	@khaNangCungCap, @maLoaiThanhToan, @maDanhMuc, @maQuocGia, @maThanhVien, @maDVT, 0, @chiTiet)
end
GO
/****** Object:  StoredProcedure [dbo].[SP_THEMEMAILCONTACT]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[SP_THEMEMAILCONTACT]
(
	@nguoiGui varchar(50),
	@NguoiNhan varchar(50),
	@ChuDe nvarchar(50),
	@NoiDung ntext,
	@HinhAnh varchar(50),
	@Link varchar(50),
	@MaSP int
	
)as
begin
	insert into EMAILCONTACT values(@nguoiGui, @NguoiNhan, @MaSP, @ChuDe, @NoiDung, @HinhAnh, @Link, GETDATE())
end
GO
/****** Object:  StoredProcedure [dbo].[SP_EMAILSENTBOX]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_EMAILSENTBOX]
(
	@EMAILNGUOIGUI VARCHAR(50)
)AS
BEGIN
	SELECT EMAIL.MaEmail, EmailNguoiGui, EmailNguoiNhan, ChuDe, HoTen, NgayGui, MaSP
	FROM EMAILCONTACT EMAIL INNER JOIN THANHVIEN TV ON EMAIL.EmailNguoiNhan = TV.Email
	WHERE EMAIL.EmailNguoiGui = @EMAILNGUOIGUI
	ORDER BY NgayGui DESC
END
GO
/****** Object:  StoredProcedure [dbo].[SP_EMAILINBOX]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_EMAILINBOX]
(
	@EMAILNGUOINHAN VARCHAR(50)
)AS
BEGIN
	SELECT EMAIL.MaEmail, EmailNguoiGui, EmailNguoiNhan, ChuDe, HoTen, NgayGui, MaSP
	FROM EMAILCONTACT EMAIL INNER JOIN THANHVIEN TV ON EMAIL.EmailNguoiGui = TV.Email
	WHERE EMAIL.EmailNguoiNhan = @EMAILNGUOINHAN
	ORDER BY NgayGui DESC
END
GO
/****** Object:  StoredProcedure [dbo].[SP_DELETEEMAILCONTACT]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_DELETEEMAILCONTACT]
(
	@MAEMAIL INT
)AS
BEGIN
	DELETE EMAILCONTACT WHERE MaEmail = @MAEMAIL
END
GO
/****** Object:  StoredProcedure [dbo].[SP_DANHSACHSANPHAMTHEODANHMUC]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_DANHSACHSANPHAMTHEODANHMUC]
(
	@MADANHMUC INT
)AS
BEGIN
	SELECT MaSP, TenSP, HinhAnh, Gia, SoLuongDatToiThieu, TenDVT
	FROM SANPHAM SP INNER JOIN DONVITINH DVT ON SP.MaSP = DVT.MaDVT
	WHERE MaDanhMuc = @MADANHMUC
	
	SELECT COUNT(MaSP) FROM SANPHAM WHERE MaDanhMuc = @MADANHMUC
END
GO
/****** Object:  StoredProcedure [dbo].[SP_DANHSACHSANPHAM_THANHVIEN]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[SP_DANHSACHSANPHAM_THANHVIEN]
(
	@MaTV int
)as
begin
	select MaSP, TenSP, Gia, SoLuongDatToiThieu, KhaNangCungUng, MaLoaiThanhToan, TinhTrang 
	from SANPHAM 
	where MaThanhVien = @MaTV
end
GO
/****** Object:  StoredProcedure [dbo].[SP_DANHSACHSANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_DANHSACHSANPHAM]
AS
BEGIN
	SELECT top 10 MaSP, TenSP, HinhAnh, Gia, SoLuongDatToiThieu, TenDVT
	FROM SANPHAM SP INNER JOIN DONVITINH DVT ON SP.MaDVT = DVT.MaDVT
END
GO
/****** Object:  StoredProcedure [dbo].[sp_ChiTietSanPham]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[sp_ChiTietSanPham]
(
	@maSP int
)AS
Begin
	select sp.MaSP, TenSP, sp.HinhAnh, Gia, SoLuongDatToiThieu, 
		KhaNangCungUng, MaLoaiThanhToan, tv.MaTV ,tv.HoTen, sp.chitiet, tv.Email
	from SANPHAM sp inner join THANHVIEN tv on sp.MaThanhVien = tv.MaTV
	where MaSP = @maSP
	
End
GO
/****** Object:  StoredProcedure [dbo].[SP_CHITIETEMAIL]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_CHITIETEMAIL]
(
	@MAEMAIL INT
)AS
BEGIN
	SELECT MaEmail, EmailNguoiGui, EmailNguoiNhan, ChuDe, NoiDung, HinhAnhSanPham, Link, NgayGui, HinhAnhSanPham
	FROM EMAILCONTACT
	where MaEmail = @MAEMAIL
END
GO
/****** Object:  Table [dbo].[TRALOIQA]    Script Date: 06/27/2013 02:32:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TRALOIQA](
	[MaTraLoi] [int] NOT NULL,
	[MaQA] [int] NULL,
	[NguoiDang] [int] NULL,
	[NgayTraLoi] [date] NULL,
	[NoiDung] [ntext] NULL,
 CONSTRAINT [PK_TRALOIQA] PRIMARY KEY CLUSTERED 
(
	[MaTraLoi] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  StoredProcedure [dbo].[SP_CAPNHATSANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[SP_CAPNHATSANPHAM]
(
	@maSP int,
	@tenSP nvarchar(80),
	@hinhAnh varchar(100),
	@gia decimal(9, 0),
	@soLuongDatToiThieu int,
	@khaNangCungCap int,
	@maLoaiThanhToan varchar(15),
	@maDanhMuc int,
	@maQuocGia int,
	@maThanhVien int,
	@maDVT int,
	@chiTiet ntext
)as
begin
	update SANPHAM 
	set TenSP = @tenSP,
		HinhAnh = @hinhAnh,
		Gia = @gia,
		SoLuongDatToiThieu = @soLuongDatToiThieu,
		KhaNangCungUng = @khaNangCungCap,
		MaLoaiThanhToan = @maLoaiThanhToan,
		MaDanhMuc = @maDanhMuc,
		MaQuocGia = @maQuocGia,
		MaThanhVien = @maThanhVien,
		MaDVT = @maDVT,
		ChiTiet = @chiTiet
	where MaSP = @maSP
end
GO
/****** Object:  StoredProcedure [dbo].[SP_BAOGIANHAN]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_BAOGIANHAN]
(
	@EMAILNGUOINHAN varchar(50)
)AS
BEGIN
	SELECT BG.MaBaoGia,TenSP, BG.[File], Link, EmailNguoiGui, 
		[TinhTrang] = case 
						when BG.TinhTrang = 0 then N'Chờ Xác Nhận'
						when BG.TinhTrang =1 then N'Từ Chối'
						when BG.TinhTrang = 2 then N'chấp Nhận' end
	FROM BAOGIA BG INNER JOIN SANPHAM SP ON BG.MASP = SP.MaSP 
	WHERE EmailNguoiNhan = @EMAILNGUOINHAN
END
GO
/****** Object:  StoredProcedure [dbo].[SP_BAOGIAGUI]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_BAOGIAGUI]
(
	@EMAILNGUOIGUI VARCHAR(50)
)AS
BEGIN
	SELECT BG.MaBaoGia,TenSP, BG.[File], Link, EmailNguoiNhan, 
		[TinhTrang] = case 
						when BG.TinhTrang = 0 then N'Chờ Xác Nhận'
						when BG.TinhTrang =1 then N'Từ Chối'
						when BG.TinhTrang = 2 then N'chấp Nhận' end
	FROM BAOGIA BG INNER JOIN SANPHAM SP ON BG.MASP = SP.MaSP 	
	WHERE EmailNguoiGui = @EMAILNGUOIGUI
END
GO
/****** Object:  StoredProcedure [dbo].[SP_CAPNHATTINHTRANG]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_CAPNHATTINHTRANG]
(
	@MABAOGIA INT,
	@TINHTRANG INT
)AS
BEGIN
	UPDATE BAOGIA
	SET TinhTrang = @TINHTRANG
	WHERE MaBaoGia = @MABAOGIA
END
GO
/****** Object:  StoredProcedure [dbo].[SP_THEMBAOGIA]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[SP_THEMBAOGIA]
(	
	@FILE VARCHAR(50),
	@MASP INT,
	@EMAILNGUOIGUI VARCHAR(50),
	@EMAILNGUOINHAN VARCHAR(50),
	@LINK VARCHAR(30)	
)
AS
BEGIN
	INSERT INTO BAOGIA VALUES (@FILE, @MASP, @EMAILNGUOIGUI, @EMAILNGUOINHAN, @LINK, 0, GETDATE())
END
GO
/****** Object:  Table [dbo].[DONDATHANG]    Script Date: 06/27/2013 02:32:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DONDATHANG](
	[MaDonHang] [int] NOT NULL,
	[MaBaoGia] [int] NULL,
	[SoLuongDat] [int] NULL,
	[Gia] [decimal](9, 0) NULL,
	[TongTien] [decimal](9, 0) NOT NULL,
	[DaTraTruoc] [decimal](9, 0) NULL,
	[TinhTrang] [int] NULL,
 CONSTRAINT [PK_DonDatHang] PRIMARY KEY CLUSTERED 
(
	[MaDonHang] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  ForeignKey [FK_BAOGIA_SANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[BAOGIA]  WITH CHECK ADD  CONSTRAINT [FK_BAOGIA_SANPHAM] FOREIGN KEY([MaSP])
REFERENCES [dbo].[SANPHAM] ([MaSP])
GO
ALTER TABLE [dbo].[BAOGIA] CHECK CONSTRAINT [FK_BAOGIA_SANPHAM]
GO
/****** Object:  ForeignKey [FK_BAOGIA_THANHVIEN]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[BAOGIA]  WITH CHECK ADD  CONSTRAINT [FK_BAOGIA_THANHVIEN] FOREIGN KEY([EmailNguoiGui])
REFERENCES [dbo].[THANHVIEN] ([Email])
GO
ALTER TABLE [dbo].[BAOGIA] CHECK CONSTRAINT [FK_BAOGIA_THANHVIEN]
GO
/****** Object:  ForeignKey [FK_BAOGIA_THANHVIEN1]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[BAOGIA]  WITH CHECK ADD  CONSTRAINT [FK_BAOGIA_THANHVIEN1] FOREIGN KEY([EmailNguoiNhan])
REFERENCES [dbo].[THANHVIEN] ([Email])
GO
ALTER TABLE [dbo].[BAOGIA] CHECK CONSTRAINT [FK_BAOGIA_THANHVIEN1]
GO
/****** Object:  ForeignKey [FK_CHITIETSANPHAM_SANPHAM]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[CHITIETSANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_CHITIETSANPHAM_SANPHAM] FOREIGN KEY([MaSP])
REFERENCES [dbo].[SANPHAM] ([MaSP])
GO
ALTER TABLE [dbo].[CHITIETSANPHAM] CHECK CONSTRAINT [FK_CHITIETSANPHAM_SANPHAM]
GO
/****** Object:  ForeignKey [FK_CHITIETSANPHAM_THONGSOMACDINH]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[CHITIETSANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_CHITIETSANPHAM_THONGSOMACDINH] FOREIGN KEY([MaThongSoMD])
REFERENCES [dbo].[THONGSOMACDINH] ([MaThongSoMD])
GO
ALTER TABLE [dbo].[CHITIETSANPHAM] CHECK CONSTRAINT [FK_CHITIETSANPHAM_THONGSOMACDINH]
GO
/****** Object:  ForeignKey [FK_DANHMUC_LINHVUC]    Script Date: 06/27/2013 02:32:31 ******/
ALTER TABLE [dbo].[DANHMUC]  WITH CHECK ADD  CONSTRAINT [FK_DANHMUC_LINHVUC] FOREIGN KEY([MaLinhVuc])
REFERENCES [dbo].[LINHVUC] ([MaLinhVuc])
GO
ALTER TABLE [dbo].[DANHMUC] CHECK CONSTRAINT [FK_DANHMUC_LINHVUC]
GO
/****** Object:  ForeignKey [FK_DONDATHANG_BAOGIA]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[DONDATHANG]  WITH CHECK ADD  CONSTRAINT [FK_DONDATHANG_BAOGIA] FOREIGN KEY([MaBaoGia])
REFERENCES [dbo].[BAOGIA] ([MaBaoGia])
GO
ALTER TABLE [dbo].[DONDATHANG] CHECK CONSTRAINT [FK_DONDATHANG_BAOGIA]
GO
/****** Object:  ForeignKey [FK_EMAILCONTACT_THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[EMAILCONTACT]  WITH CHECK ADD  CONSTRAINT [FK_EMAILCONTACT_THANHVIEN] FOREIGN KEY([EmailNguoiGui])
REFERENCES [dbo].[THANHVIEN] ([Email])
GO
ALTER TABLE [dbo].[EMAILCONTACT] CHECK CONSTRAINT [FK_EMAILCONTACT_THANHVIEN]
GO
/****** Object:  ForeignKey [FK_EMAILCONTACT_THANHVIEN1]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[EMAILCONTACT]  WITH CHECK ADD  CONSTRAINT [FK_EMAILCONTACT_THANHVIEN1] FOREIGN KEY([EmailNguoiNhan])
REFERENCES [dbo].[THANHVIEN] ([Email])
GO
ALTER TABLE [dbo].[EMAILCONTACT] CHECK CONSTRAINT [FK_EMAILCONTACT_THANHVIEN1]
GO
/****** Object:  ForeignKey [FK_QA_THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[QA]  WITH CHECK ADD  CONSTRAINT [FK_QA_THANHVIEN] FOREIGN KEY([NguoiDang])
REFERENCES [dbo].[THANHVIEN] ([MaTV])
GO
ALTER TABLE [dbo].[QA] CHECK CONSTRAINT [FK_QA_THANHVIEN]
GO
/****** Object:  ForeignKey [FK_SANPHAM_DANHMUC]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAM_DANHMUC] FOREIGN KEY([MaDanhMuc])
REFERENCES [dbo].[DANHMUC] ([MaDanhMuc])
GO
ALTER TABLE [dbo].[SANPHAM] CHECK CONSTRAINT [FK_SANPHAM_DANHMUC]
GO
/****** Object:  ForeignKey [FK_SANPHAM_DONVITINH]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAM_DONVITINH] FOREIGN KEY([MaDVT])
REFERENCES [dbo].[DONVITINH] ([MaDVT])
GO
ALTER TABLE [dbo].[SANPHAM] CHECK CONSTRAINT [FK_SANPHAM_DONVITINH]
GO
/****** Object:  ForeignKey [FK_SANPHAM_QUOCGIA]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAM_QUOCGIA] FOREIGN KEY([MaQuocGia])
REFERENCES [dbo].[QUOCGIA] ([MaQuocGia])
GO
ALTER TABLE [dbo].[SANPHAM] CHECK CONSTRAINT [FK_SANPHAM_QUOCGIA]
GO
/****** Object:  ForeignKey [FK_SANPHAM_THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAM_THANHVIEN] FOREIGN KEY([MaThanhVien])
REFERENCES [dbo].[THANHVIEN] ([MaTV])
GO
ALTER TABLE [dbo].[SANPHAM] CHECK CONSTRAINT [FK_SANPHAM_THANHVIEN]
GO
/****** Object:  ForeignKey [FK_SANPHAMMUA_DANHMUC]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAMMUA]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAMMUA_DANHMUC] FOREIGN KEY([MaDanhMuc])
REFERENCES [dbo].[DANHMUC] ([MaDanhMuc])
GO
ALTER TABLE [dbo].[SANPHAMMUA] CHECK CONSTRAINT [FK_SANPHAMMUA_DANHMUC]
GO
/****** Object:  ForeignKey [FK_SANPHAMMUA_THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[SANPHAMMUA]  WITH CHECK ADD  CONSTRAINT [FK_SANPHAMMUA_THANHVIEN] FOREIGN KEY([MaThanhVien])
REFERENCES [dbo].[THANHVIEN] ([MaTV])
GO
ALTER TABLE [dbo].[SANPHAMMUA] CHECK CONSTRAINT [FK_SANPHAMMUA_THANHVIEN]
GO
/****** Object:  ForeignKey [FK_THANHVIEN_LOAITHANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[THANHVIEN]  WITH CHECK ADD  CONSTRAINT [FK_THANHVIEN_LOAITHANHVIEN] FOREIGN KEY([MaLoaiTV])
REFERENCES [dbo].[LOAITHANHVIEN] ([MaLoaiTV])
GO
ALTER TABLE [dbo].[THANHVIEN] CHECK CONSTRAINT [FK_THANHVIEN_LOAITHANHVIEN]
GO
/****** Object:  ForeignKey [FK_THANHVIEN_TINHTHANH/BANG]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[THANHVIEN]  WITH CHECK ADD  CONSTRAINT [FK_THANHVIEN_TINHTHANH/BANG] FOREIGN KEY([MaTinhThanh/Bang])
REFERENCES [dbo].[TINHTHANH/BANG] ([MaTinhThanh/Bang])
GO
ALTER TABLE [dbo].[THANHVIEN] CHECK CONSTRAINT [FK_THANHVIEN_TINHTHANH/BANG]
GO
/****** Object:  ForeignKey [FK_THONGSOMACDINH_THONGSOSANPHAM]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[THONGSOMACDINH]  WITH CHECK ADD  CONSTRAINT [FK_THONGSOMACDINH_THONGSOSANPHAM] FOREIGN KEY([MaThongSo])
REFERENCES [dbo].[THONGSOSANPHAM] ([MaThongSo])
GO
ALTER TABLE [dbo].[THONGSOMACDINH] CHECK CONSTRAINT [FK_THONGSOMACDINH_THONGSOSANPHAM]
GO
/****** Object:  ForeignKey [FK_THONGSOSANPHAM_DANHMUC]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[THONGSOSANPHAM]  WITH CHECK ADD  CONSTRAINT [FK_THONGSOSANPHAM_DANHMUC] FOREIGN KEY([MaDM])
REFERENCES [dbo].[DANHMUC] ([MaDanhMuc])
GO
ALTER TABLE [dbo].[THONGSOSANPHAM] CHECK CONSTRAINT [FK_THONGSOSANPHAM_DANHMUC]
GO
/****** Object:  ForeignKey [FK_TINHTHANH/BANG_QUOCGIA]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[TINHTHANH/BANG]  WITH CHECK ADD  CONSTRAINT [FK_TINHTHANH/BANG_QUOCGIA] FOREIGN KEY([MaQuocGia])
REFERENCES [dbo].[QUOCGIA] ([MaQuocGia])
GO
ALTER TABLE [dbo].[TINHTHANH/BANG] CHECK CONSTRAINT [FK_TINHTHANH/BANG_QUOCGIA]
GO
/****** Object:  ForeignKey [FK_TRALOIQA_QA]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[TRALOIQA]  WITH CHECK ADD  CONSTRAINT [FK_TRALOIQA_QA] FOREIGN KEY([MaQA])
REFERENCES [dbo].[QA] ([MaQA])
GO
ALTER TABLE [dbo].[TRALOIQA] CHECK CONSTRAINT [FK_TRALOIQA_QA]
GO
/****** Object:  ForeignKey [FK_TRALOIQA_THANHVIEN]    Script Date: 06/27/2013 02:32:32 ******/
ALTER TABLE [dbo].[TRALOIQA]  WITH CHECK ADD  CONSTRAINT [FK_TRALOIQA_THANHVIEN] FOREIGN KEY([NguoiDang])
REFERENCES [dbo].[THANHVIEN] ([MaTV])
GO
ALTER TABLE [dbo].[TRALOIQA] CHECK CONSTRAINT [FK_TRALOIQA_THANHVIEN]
GO
